home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / stdlib / RCS / atexit.man,v < prev    next >
Encoding:
Text File  |  1989-01-06  |  1.6 KB  |  67 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.1
  10. date     89.01.05.18.00.22;  author ouster;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @' Copyright 1989 Regents of the University of California
  26. ' Permission to use, copy, modify, and distribute this
  27. ' documentation for any purpose and without fee is hereby
  28. ' granted, provided that this notice appears in all copies.
  29. ' The University of California makes no representations about
  30. ' the suitability of this material for any purpose.  It is
  31. ' provided "as is" without express or implied warranty.
  32. ' $Header: /sprite/lib/forms/RCS/proto.man,v 1.1 88/12/29 17:09:50 ouster Exp $ SPRITE (Berkeley)
  33. .so \*(]ltmac.sprite
  34. .HS atexit cmds
  35. .BS
  36. .SH NAME
  37. atexit \- Register procedure to be invoked before process exits
  38. .SH SYNOPSIS
  39. .nf
  40. \fB#include <stdlib.h>
  41.  
  42. \fBint
  43. atexit(\fIfunc\fB)\fR
  44. .SH ARGUMENTS
  45. .AP void *func() in
  46. Procedure to call just before process exits.
  47. .BE
  48.  
  49. .SH DESCRIPTION
  50. .PP
  51. \fBAtexit\fR may be used to register the procedure \fIfunc\fR, such
  52. that \fIfunc\fR will be invoked by the \fBexit\fR procedure before
  53. the process exits.  \fIFunc\fR will only be called if the \fBexit\fR
  54. procedure is invoked:  if the process terminates because of a signal,
  55. or if the process bypasses \fBexit\fR by calling \fB_exit\fR, then \fIfunc\fR
  56. will not be invoked.
  57. \fIFunc\fR takes no arguments and returns no result.
  58. .PP
  59. The normal return value from \fBatexit\fR is 0.  If the registration
  60. fails then a non-zero value is returned.
  61. .DE
  62. .SH KEYWORDS
  63. exit, handler, register
  64. @
  65.